<template>
  <el-row type="flex" justify="space-around" align="middle">
    <el-col>
      <div v-if="userName">
        <span>{{ userName }}</span> <span>,欢迎光临。</span>
      </div>
      <div v-else><span>未登录</span></div>
    </el-col>
    <el-col>宇宙超自然现象机构管理系统</el-col>
    <el-col>
      <el-button type="text" icon="el-icon-edit">修改信息</el-button>
      <el-button type="text" icon="el-icon-setting" @click="logout"
        >退出系统</el-button
      >
    </el-col>
  </el-row>
</template>

<script>
export default {
  data() {
    return {
      userName: "",
    };
  },
  methods: {
    logout() {
      this.$router.push("/login");
    },
  },
};
</script>

<style>
</style>